package org.naxx.security.common;

import java.util.UUID;
import java.util.concurrent.atomic.AtomicLong;

/**
 * Uuid generation facility. For now we use following to
 * generate uuid: <code>UUID.randomUUID().toString()+'_'+counter</code>.
 */
public final class UuidGen {

	private final AtomicLong counter;
	
	public UuidGen() {
		this.counter = new AtomicLong(0);
	}
	
	public String getRandomUuid() {
		return UUID.randomUUID().toString() + '_' + this.counter.getAndIncrement();
	}
}
